Main Tab 1
Column
Column Tab 1
this tab could be used for general information about the subject.
Column Tab 2
this tab could be used to introduce the topic in the way in which we are analyzing it.
this tab could be used for general information about the subject.
this tab could be used to introduce the topic in the way in which we are analyzing it.
---
title: "Question 2"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
source_code: embed
social: menu
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(plotly)
library(knitr)
library(DT)
df <- read_csv('all-states-history.csv')
# Create a ggplot object
p <- df %>%
group_by(date) %>%
ggplot()+
geom_smooth(mapping = aes(x=date, y=hospitalizedCumulative))+
labs(x='Date', y='cumulitive hospitilizations')
p1 <- df %>%
filter(state == "CT"|state == "RI"|state == "MA") %>%
ggplot()+
geom_smooth(mapping = aes(x=date, y=hospitalizedCumulative, color = state))+
labs(x='Date', y='cumulitive hospitilizations', title = "local COVID Positive Rates")
p2 <- df %>%
filter(state == "CT"|state == "RI"|state == "MA") %>%
ggplot()+
geom_point(mapping=aes(y=totalTestResults,x=date))+facet_wrap(~state)+
labs(title = "tests by date", y = "total tests")
p3 <- df %>%
filter(state == "CT"|state == "RI"|state == "MA") %>%
ggplot()+
geom_smooth(mapping = aes(x=date, y=death, color = state))+
labs(x='Date', y='Deaths', title = "local Death Rates")
```
{.sidebar}
=======================================================================
### 1. State Covid Data
The COVID outbreak caused many deaths and hardships. This dataset tracks the positive rates, deaths, test amounts and many more variables pertaining to COVID-19
### 2. Flexdashboard and Plotly
This interactive uses `flexdashboard` and `plotly` to visualize the data.
Main Tab 1
=======================================================================
Column {data-width=500, .tabset}
-----------------------------------------------------------------------
### Column Tab 1
this tab could be used for general information about the subject.
### Column Tab 2
this tab could be used to introduce the topic in the way in which we are analyzing it.
### Column Tab 3
```{r}
datatable(df, options = list(
pageLength = 25
))
```
Main Tab 2
=======================================================================
Column {data-width=500}
-----------------------------------------------------------------------
#### Significant Graphs:
```{r}
p
```
```{r}
p1
```
Main Tab 3
=======================================================================
Column {data-width=500}
-----------------------------------------------------------------------
#### More Significant Graphs:
```{r}
p2
```
```{r}
p3
```